package Panel;
import java.awt.Graphics2D;
import java.awt.geom.Rectangle2D;

public class RectangleTest {
	public RectangleTest(Graphics2D g2, double leftX, double topY, double width, double height){

		Rectangle2D rect = new Rectangle2D.Double(leftX, topY, width, height);//创建矩形对象
	    g2.draw(rect);//将矩形对象绘制于Panel面板上
	     
	}

}
